<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@include file="../template/header.jsp" %>
<div class="row-fluid">
	<h2>${model.book.name}</h2>
	<span class="author">By ${model.book.author.name}</span><br />
	<img src="${pageContext.request.contextPath}/assets/img/books/${model.book.coverImage}" />
	<p class="book_descrip">
		${model.book.description};
	</p>
	<h4>$<fmt:formatNumber pattern="00.00" value="${model.book.price}"/></h4>
	<form method="post" action="${pageContext.request.contextPath}/UserCartBooks/add">
		<%
		String qty = request.getParameter("qty");
		if(qty == null)
		{
			qty = "1";
		}
		%>
		<input type="hidden" name="book_id" value="${model.book.id}" />
		<label>Qty</label><input class="span1" type="number" name="qty" value="<%=qty%>" />
		<input type="submit" class="btn btn-success" value="Add To Cart" />
	</form>
</div>
<%@include file="../template/footer.jsp" %>